package com.you.raft.common.entity;

import lombok.Getter;
import lombok.ToString;

import java.util.Objects;

@ToString
@Getter
public class Node {
    private final String address;

    public Node(String address) {
        this.address = address;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Node node = (Node) o;
        return Objects.equals(address, node.address);
    }

    @Override
    public int hashCode() {
        return Objects.hash(address);
    }
}
